3.3.91 \(\int \frac {(e+f x) \cosh (c+d x)}{a+b \sinh (c+d x)} \, dx\) [291]

Optimal. Leaf size=170 \[ -\frac {(e+f x)^2}{2 b f}+\frac {(e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b d}+\frac {(e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b d}+\frac {f \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b d^2}+\frac {f \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b d^2} \]

[Out]

-1/2*(f*x+e)^2/b/f+(f*x+e)*ln(1+b*exp(d*x+c)/(a-(a^2+b^2)^(1/2)))/b/d+(f*x+e)*ln(1+b*exp(d*x+c)/(a+(a^2+b^2)^(
1/2)))/b/d+f*polylog(2,-b*exp(d*x+c)/(a-(a^2+b^2)^(1/2)))/b/d^2+f*polylog(2,-b*exp(d*x+c)/(a+(a^2+b^2)^(1/2)))
/b/d^2

________________________________________________________________________________________

Rubi [A]
time = 0.17, antiderivative size = 170, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {5680, 2221, 2317, 2438} \begin {gather*} \frac {f \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b d^2}+\frac {f \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b d^2}+\frac {(e+f x) \log \left (\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}+1\right )}{b d}+\frac {(e+f x) \log \left (\frac {b e^{c+d x}}{\sqrt {a^2+b^2}+a}+1\right )}{b d}-\frac {(e+f x)^2}{2 b f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((e + f*x)*Cosh[c + d*x])/(a + b*Sinh[c + d*x]),x]

[Out]

-1/2*(e + f*x)^2/(b*f) + ((e + f*x)*Log[1 + (b*E^(c + d*x))/(a - Sqrt[a^2 + b^2])])/(b*d) + ((e + f*x)*Log[1 +
 (b*E^(c + d*x))/(a + Sqrt[a^2 + b^2])])/(b*d) + (f*PolyLog[2, -((b*E^(c + d*x))/(a - Sqrt[a^2 + b^2]))])/(b*d
^2) + (f*PolyLog[2, -((b*E^(c + d*x))/(a + Sqrt[a^2 + b^2]))])/(b*d^2)

Rule 2221

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
 - Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 5680

Int[(Cosh[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symbol] :
> Simp[-(e + f*x)^(m + 1)/(b*f*(m + 1)), x] + (Int[(e + f*x)^m*(E^(c + d*x)/(a - Rt[a^2 + b^2, 2] + b*E^(c + d
*x))), x] + Int[(e + f*x)^m*(E^(c + d*x)/(a + Rt[a^2 + b^2, 2] + b*E^(c + d*x))), x]) /; FreeQ[{a, b, c, d, e,
 f}, x] && IGtQ[m, 0] && NeQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int \frac {(e+f x) \cosh (c+d x)}{a+b \sinh (c+d x)} \, dx &=-\frac {(e+f x)^2}{2 b f}+\int \frac {e^{c+d x} (e+f x)}{a-\sqrt {a^2+b^2}+b e^{c+d x}} \, dx+\int \frac {e^{c+d x} (e+f x)}{a+\sqrt {a^2+b^2}+b e^{c+d x}} \, dx\\ &=-\frac {(e+f x)^2}{2 b f}+\frac {(e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b d}+\frac {(e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b d}-\frac {f \int \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right ) \, dx}{b d}-\frac {f \int \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right ) \, dx}{b d}\\ &=-\frac {(e+f x)^2}{2 b f}+\frac {(e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b d}+\frac {(e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b d}-\frac {f \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{a-\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{b d^2}-\frac {f \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{a+\sqrt {a^2+b^2}}\right )}{x} \, dx,x,e^{c+d x}\right )}{b d^2}\\ &=-\frac {(e+f x)^2}{2 b f}+\frac {(e+f x) \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b d}+\frac {(e+f x) \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b d}+\frac {f \text {Li}_2\left (-\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )}{b d^2}+\frac {f \text {Li}_2\left (-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{b d^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 157, normalized size = 0.92 \begin {gather*} \frac {-d (e+f x) \left (d e+d f x-2 f \log \left (1+\frac {b e^{c+d x}}{a-\sqrt {a^2+b^2}}\right )-2 f \log \left (1+\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )\right )+2 f^2 \text {PolyLog}\left (2,\frac {b e^{c+d x}}{-a+\sqrt {a^2+b^2}}\right )+2 f^2 \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a+\sqrt {a^2+b^2}}\right )}{2 b d^2 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)*Cosh[c + d*x])/(a + b*Sinh[c + d*x]),x]

[Out]

(-(d*(e + f*x)*(d*e + d*f*x - 2*f*Log[1 + (b*E^(c + d*x))/(a - Sqrt[a^2 + b^2])] - 2*f*Log[1 + (b*E^(c + d*x))
/(a + Sqrt[a^2 + b^2])])) + 2*f^2*PolyLog[2, (b*E^(c + d*x))/(-a + Sqrt[a^2 + b^2])] + 2*f^2*PolyLog[2, -((b*E
^(c + d*x))/(a + Sqrt[a^2 + b^2]))])/(2*b*d^2*f)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(411\) vs. \(2(156)=312\).
time = 1.53, size = 412, normalized size = 2.42

method result size
risch \(-\frac {f \,x^{2}}{2 b}+\frac {e x}{b}+\frac {2 f c \ln \left ({\mathrm e}^{d x +c}\right )}{d^{2} b}-\frac {f c \ln \left (b \,{\mathrm e}^{2 d x +2 c}+2 a \,{\mathrm e}^{d x +c}-b \right )}{d^{2} b}-\frac {2 e \ln \left ({\mathrm e}^{d x +c}\right )}{d b}+\frac {e \ln \left (b \,{\mathrm e}^{2 d x +2 c}+2 a \,{\mathrm e}^{d x +c}-b \right )}{d b}-\frac {2 c f x}{d b}-\frac {f \,c^{2}}{d^{2} b}+\frac {f \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) x}{d b}+\frac {f \ln \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} b}+\frac {f \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) x}{d b}+\frac {f \ln \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right ) c}{d^{2} b}+\frac {f \dilog \left (\frac {b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}+a}{a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} b}+\frac {f \dilog \left (\frac {-b \,{\mathrm e}^{d x +c}+\sqrt {a^{2}+b^{2}}-a}{-a +\sqrt {a^{2}+b^{2}}}\right )}{d^{2} b}\) \(412\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)*cosh(d*x+c)/(a+b*sinh(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-1/2*f*x^2/b+e*x/b+2/d^2/b*f*c*ln(exp(d*x+c))-1/d^2/b*f*c*ln(b*exp(2*d*x+2*c)+2*a*exp(d*x+c)-b)-2/d/b*e*ln(exp
(d*x+c))+1/d/b*e*ln(b*exp(2*d*x+2*c)+2*a*exp(d*x+c)-b)-2/d/b*c*f*x-1/d^2/b*f*c^2+1/d/b*f*ln((-b*exp(d*x+c)+(a^
2+b^2)^(1/2)-a)/(-a+(a^2+b^2)^(1/2)))*x+1/d^2/b*f*ln((-b*exp(d*x+c)+(a^2+b^2)^(1/2)-a)/(-a+(a^2+b^2)^(1/2)))*c
+1/d/b*f*ln((b*exp(d*x+c)+(a^2+b^2)^(1/2)+a)/(a+(a^2+b^2)^(1/2)))*x+1/d^2/b*f*ln((b*exp(d*x+c)+(a^2+b^2)^(1/2)
+a)/(a+(a^2+b^2)^(1/2)))*c+1/d^2/b*f*dilog((b*exp(d*x+c)+(a^2+b^2)^(1/2)+a)/(a+(a^2+b^2)^(1/2)))+1/d^2/b*f*dil
og((-b*exp(d*x+c)+(a^2+b^2)^(1/2)-a)/(-a+(a^2+b^2)^(1/2)))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cosh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="maxima")

[Out]

1/2*f*(x^2/b - integrate(4*(a*x*e^(d*x + c) - b*x)/(b^2*e^(2*d*x + 2*c) + 2*a*b*e^(d*x + c) - b^2), x)) + e*lo
g(b*sinh(d*x + c) + a)/(b*d)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 401 vs. \(2 (157) = 314\).
time = 0.37, size = 401, normalized size = 2.36 \begin {gather*} -\frac {d^{2} f x^{2} + 2 \, d^{2} x \cosh \left (1\right ) + 2 \, d^{2} x \sinh \left (1\right ) - 2 \, f {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) - 2 \, f {\rm Li}_2\left (\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b} + 1\right ) + 2 \, {\left (c f - d \cosh \left (1\right ) - d \sinh \left (1\right )\right )} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) + 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) + 2 \, {\left (c f - d \cosh \left (1\right ) - d \sinh \left (1\right )\right )} \log \left (2 \, b \cosh \left (d x + c\right ) + 2 \, b \sinh \left (d x + c\right ) - 2 \, b \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} + 2 \, a\right ) - 2 \, {\left (d f x + c f\right )} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) + {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right ) - 2 \, {\left (d f x + c f\right )} \log \left (-\frac {a \cosh \left (d x + c\right ) + a \sinh \left (d x + c\right ) - {\left (b \cosh \left (d x + c\right ) + b \sinh \left (d x + c\right )\right )} \sqrt {\frac {a^{2} + b^{2}}{b^{2}}} - b}{b}\right )}{2 \, b d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cosh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="fricas")

[Out]

-1/2*(d^2*f*x^2 + 2*d^2*x*cosh(1) + 2*d^2*x*sinh(1) - 2*f*dilog((a*cosh(d*x + c) + a*sinh(d*x + c) + (b*cosh(d
*x + c) + b*sinh(d*x + c))*sqrt((a^2 + b^2)/b^2) - b)/b + 1) - 2*f*dilog((a*cosh(d*x + c) + a*sinh(d*x + c) -
(b*cosh(d*x + c) + b*sinh(d*x + c))*sqrt((a^2 + b^2)/b^2) - b)/b + 1) + 2*(c*f - d*cosh(1) - d*sinh(1))*log(2*
b*cosh(d*x + c) + 2*b*sinh(d*x + c) + 2*b*sqrt((a^2 + b^2)/b^2) + 2*a) + 2*(c*f - d*cosh(1) - d*sinh(1))*log(2
*b*cosh(d*x + c) + 2*b*sinh(d*x + c) - 2*b*sqrt((a^2 + b^2)/b^2) + 2*a) - 2*(d*f*x + c*f)*log(-(a*cosh(d*x + c
) + a*sinh(d*x + c) + (b*cosh(d*x + c) + b*sinh(d*x + c))*sqrt((a^2 + b^2)/b^2) - b)/b) - 2*(d*f*x + c*f)*log(
-(a*cosh(d*x + c) + a*sinh(d*x + c) - (b*cosh(d*x + c) + b*sinh(d*x + c))*sqrt((a^2 + b^2)/b^2) - b)/b))/(b*d^
2)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (e + f x\right ) \cosh {\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cosh(d*x+c)/(a+b*sinh(d*x+c)),x)

[Out]

Integral((e + f*x)*cosh(c + d*x)/(a + b*sinh(c + d*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)*cosh(d*x+c)/(a+b*sinh(d*x+c)),x, algorithm="giac")

[Out]

integrate((f*x + e)*cosh(d*x + c)/(b*sinh(d*x + c) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\mathrm {cosh}\left (c+d\,x\right )\,\left (e+f\,x\right )}{a+b\,\mathrm {sinh}\left (c+d\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cosh(c + d*x)*(e + f*x))/(a + b*sinh(c + d*x)),x)

[Out]

int((cosh(c + d*x)*(e + f*x))/(a + b*sinh(c + d*x)), x)

________________________________________________________________________________________